from dataclasses import dataclass

@dataclass
class DemoDataClass:
    a: int           # <1>
    b: float = 1.1   # <2>
    c = 'spam'       # <3>


d3 = DemoDataClass(2)
print(d3)
d3.a = 3  # 可以更改！
